//
//  CZStatusNormalCell.swift
//  weibo27
//
//  Created by mac on 16/4/20.
//  Copyright © 2016年 it.cast. All rights reserved.
//

import UIKit

class CZStatusNormalCell: CZStatusCell {
    
    override var statusViewModel:CZStatusViewModel?{
        didSet{
            picture.statusViewModel = statusViewModel
            //传过去后根据sizeToFize()返回回来一些具体的高和宽
            picture.snp_updateConstraints { (make) -> Void in
                let offset = statusViewModel?.thumbnail_pic?.count > 0 ? StatusCellMargin : 0
                make.top.equalTo(textView.snp_bottom).offset(offset)
            }
        }
    }
    override func setupUI() {
        
        super.setupUI()
        //图片数组
        picture.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(textView.snp_bottom).offset(StatusCellMargin)
            make.left.equalTo(textView.snp_left)
            make.width.equalTo(300)
            make.height.equalTo(90)
        }
        
    }
}
